<include file="Public:header" />
<script language="javascript" type="text/javascript" src="__PUBLIC__/admin/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
$(function(){
	layout.listCheckAll();
	layout.listTableColor();
	layout.listFormSelectType('articleListForm','operateType','selectTypeBtn');
    layout.delDataConfirm();	
});
</script>
<body class="mainBackground">
	<include file="Public:menu" />
	<div class="main" id="mainContainer">
    	<div class="content_box">
        	<div class="content_box_t">
            	<h3 class="fl">
                管理留言
                </h3>
            </div>
            <div class="content_box_c">
            	<form action="__URL__" method="get" class="pb20" id="articleSearchForm">
    				<label class="searchForm_title">类型</label>
                    <select name="type" class="public_dropdown ">
							<option value="">请选择类型</option>
							<volist name="type" id="vo">
            				<option value="{$key}">{$vo}</option>
           					</volist>
					</select>                
                	<label class="searchForm_title">用户名</label><input class="text_input samll_input" type="text" name="username" value="{$param.username}" /> <label class="searchForm_title">留言时间</label><input class="text_input w10_input Wdate" type="text" name="start_time" onClick="WdatePicker()" readonly/>-<input class="text_input w10_input Wdate" type="text" name="end_time"  onClick="WdatePicker()" readonly/>             
                    <input type="submit" value="搜索" class="public_button ml10" />   
                </form>          
                <notempty name="datas">
                <form action="__URL__/del" method="POST" id="articleListForm">
            	<table class="public_table">
					<thead>
						<tr>
							<th><input class="check_all" type="checkbox" /></th>
                            <th>ID</th>
                            <th>类型</th>
							<th>留言人</th>
                            <th>邮箱</th>
                            <th>内容</th>
                            <th>留言时间</th>
                            <th>状态</th>
                            <th>回复状态</th>
							<th>操作</th>
						</tr>	
					</thead> 
					<tbody>
                    <volist name="datas" id="data">
						<tr>
							<td><input type="checkbox"  name="id[]" value="{$data.id}"/></td>
                            <td>{$data.id}</td>
                            <td>{$type[$data['type']]}</td>
                            <td>{$data.username}</td>
							<td>{$data.email}</td>
                            <td>{$data.content|msubstr=0,24,'utf-8'}</td>
                            <td>{$data.add_time|date="Y-m-d H:i:s",###}</td>
                            <td>
                            	<eq name="data[status]" value="1">开放<else/>禁止</eq>
                            </td>
                            <td>
                            	<neq name="data[reply_name]" value=''>
                                {$data.reply_name}:已回复
                                <else/>
                                未回复
                                </neq>
                            </td>
							<td>
								<a href="{:U('Message/edit',array('id'=>$data[id]))}" title="回复" class="mr5">回复</a>
								<a href="{:U('Message/del',array('id'=>$data[id]))}" title="删除" class="delHandle">删除</a> 
							</td>
						</tr>
					</volist>	                                              
					</tbody>  
					<tfoot>
						<tr>
							<td colspan="10">
								<div class="bulk_actions fl">
											<select name="operateType" id="operateType">
												<option value="__URL__/del">删除</option>
												<option value="__URL__/change/type/resume">开启</option>
                                                <option value="__URL__/change/type/forbid">禁止</option>
											</select>
                                            <input type="submit" value="确定"  class="public_button" id="selectTypeBtn"/>
								</div>
										
								<div class="pagination fr">
                                	{$page}
								</div>
								<div class="clear"></div>
							</td>
						</tr>
					</tfoot>                    
				</table>
                </form>
                </notempty>
            </div>
        </div>            
    </div>
</body>
</html>
